Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow changing background color #404

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Shriukan33
Copy link
Contributor


name: Pull request
about: Submit a pull request for this project
assignees: fabiocaccamo


Describe your changes
I added 4 customization options to Themes :

  • Body background color
  • Foreground color
  • Quiet color
  • Loud color

And extended French translation for the newly added fields.
I couldn't find places where loud color was used, but it felt awkward to add the option for the quiet color without the loud color.

Related issue
#291

Checklist before requesting a review

  • I have performed a self-review of my code.
  • [NA] I have added tests for the proposed changes.
  • I have run the tests and there are no errors.

I'm reopening this because the change was reverted, but no idea why ? So far, I've used my own fork on different projects without any noticeable issue

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.46%. Comparing base (faf8960) to head (b452ccc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
+ Coverage   97.38%   97.46%   +0.08%     
==========================================
  Files          38       40       +2     
  Lines         420      434      +14     
==========================================
+ Hits          409      423      +14     
  Misses         11       11              
Flag Coverage Δ
unittests 97.46% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -38,6 +38,10 @@ msgstr "Favicon"
msgid "Title"
msgstr "Titre"

#: admin_interface/admin.py
msgid "Body"
msgstr "Body"

This comment was marked as resolved.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed ! Thanks for feedback !

@@ -174,10 +178,30 @@ msgstr "code"
msgid "display"
msgstr "affichage"

#: admin_interface/models.py
msgid "Required fields, error messages"
msgstr "Défaut: #333 (champs requis, messages d'erreur)"

This comment was marked as resolved.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed ! Thanks for feedback !

@BMourguesFieldbox
Copy link

Hello there @fabiocaccamo :)

#: admin_interface/models.py
msgid "background color"
msgstr "couleur d'arrière-plan"

#: admin_interface/models.py
msgid "Optional fields, help text, field content"
msgstr "Défaut: #666 (champs optionnels, texte d'aide, contenu des champs)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we still have more info in the translation than the original!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this PR could add a single migration

@fabiocaccamo
Copy link
Owner

@BMourguesFieldbox @merwok sorry for the long silence on this PR.

The main reason is that since Django introduced CSS variables, I would rewrite all the color fields of the theme model to match the CSS variables exposed by Django.

By approaching the problem in this way, supporting dark-themes would be much easier.
The trickiest part of these changes is migrating existing fields correctly with a single migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants